<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Login Page</title>
<style>

.error {
	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid transparent;
	border-radius: 4px;
	color: #a94442;
	background-color: #f2dede;
	border-color: #ebccd1;
}
 
.msg {
	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid transparent;
	border-radius: 4px;
	color: #31708f;
	background-color: #d9edf7;
	border-color: #bce8f1;
}
 
#login-box {
	width: 260px;
	padding: 20px;
	margin: 100px auto;
	background: #fff;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	border: 1px solid #000;
}
</style>
</head>
<body  bgcolor="#F5F4DA" onload='document.loginForm.username.focus();'>
 		
 	<form name='adminform' action="<c:url value='baza' />" method='GET'>
 			<table>
 			<td><input type="submit" value="panel administratora" /></td>
			</table>			
 	</form>
	
 
	<div id="login-box">
 
		<h3>Logowanie lub rejestracja</h3>
			
		<c:if test="${not empty error}">
			<div class="error">${error}</div>
		</c:if>
		<c:if test="${not empty msg}">
			<div class="msg">${msg}</div>
		</c:if>
 		
 		<form name='registerform' 
 			action="<c:url value='register' />" method='GET'>
 			<table>
 			<td><input type="submit"
					value="zarejestruj" /></td>
			</table>
					
 		</form>
 		
		<form name='loginForm'
		  action="<c:url value='j_spring_security_check' />" method='POST'>
 
		  <table>
			<tr>
				<td>Login:</td>
				<td><input type='text' name='username' value=''></td>
			</tr>
			<tr>
				<td>Haslo:</td>
				<td><input type='password' name='password' /></td>
			</tr>	
			<tr>
				<td><input name="submit" type="submit"
					value="zaloguj" /></td>
				
			</tr>
		  </table>
 
		  

		</form>
		
	</div>
 		
</body>
</html>